Repository navigation
refactor(components)!: retire 63 zero-consumer shadcn sub-part entry exports - #30752
Merged
Merged
Conversation
…exports The package entry re-exported every shadcn primitive with `export *`. Sixty-three sub-parts have no importer outside the package (workspace, docs and hotcrm), are not taught in the package README, and no kept export's signature names them. Thirteen `export *` lines in `src/ui/index.ts` become named lists of their kept parts; the renderers that read a retired part import it from its module file instead. `src/ui/typography.tsx` had no reader inside the package either and is deleted (12 names). It is not a shadcn registry component. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgV6Wix8Nbop1d5WqZB
The ADR-0087 runtime-export-retired marker reads each operand's FROM side; the grouped shadcn line named none. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgV6Wix8Nbop1d5WqZB
Contributor
Author
|
domain:ui#6 · os-sales · session_01L6bhgUR8Nu4M7tbtgES7q2 维护者速读
席位核对 — ACCEPT · head 7b1fe21
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sales · project thread
Part of #25921. The umbrella stays open; this is barrel batch 6, claim 6672518852 (seat
domain:ui#6). Earlier batches: #30541, #30576, #30629, #30650, #30708.Clause-②: no (narrowing)
Metadata-protocol: none
维护者速读
@object-ui/components的包入口不再导出 63 个 shadcn 子部件。其中typography.tsx的 12 个Typography*包内也无人读,连文件删除;其余 51 个只离开入口,留在各自的 shadcn 模块里供本包渲染器使用。@object-ui/*包和所有 schema 节点类型(menubar、pagination、carousel 等)照常渲染。src/ui/index.ts的 13 行export *改成具名列表,反向探针证明其余 408 个入口名一个不少。回滚即 revert 本 PR。ui/packages/components/src/ui/index.ts(具名列表,漏列即丢活名)、5 个渲染器的 import 改指模块文件、.changeset/25921-components-zero-consumer-exports.md(迁移说明)。git grep -l -w -e TypographyH1 -e MenubarContent -e PaginationLink -- ':!ui/packages/components' ':!**/CHANGELOG.md'应只命中本 PR 的 changeset。What changes
@object-ui/components, deleted (nothing inside the package read them, tests included):src/ui/typography.tsxwithTypographyH1,TypographyH2,TypographyH3,TypographyH4,TypographyP,TypographyBlockquote,TypographyList,TypographyInlineCode,TypographyLead,TypographyLarge,TypographySmall,TypographyMuted. The file is not inshadcn-components.json, so no registry sync restores it.@object-ui/components, off the entry only (the shadcn module files are untouched, sopnpm shadcn:updatestays a clean re-fetch): 51 sub-parts ofalert-dialog(2),breadcrumb(2),carousel(3),command(1),context-menu(7),drawer(2),form(1,useFormField),input-otp(2),menubar(13),navigation-menu(8),pagination(6),select(3),table(1). Names per module are in the changeset. Those thirteenexport *lines insrc/ui/index.ts(an unpublished sub-barrel;exportshas only.and./style.css) become named lists of the kept parts.CarouselApi(the keptCarousel'ssetApiprop names it) andtoggleVariants(the keptToggle/ToggleGroupprops are typed asVariantPropsoftypeof toggleVariants).export * from './toggle'therefore stays as is.../../uibarrel now import it from its module file:renderers/complex/carousel.tsx,renderers/complex/table.tsx,renderers/form/input-otp.tsx,renderers/overlay/context-menu.tsx,renderers/navigation/header-bar.tsx(BreadcrumbSeparatoronly); and one test,__tests__/snapshot-critical.test.tsx, which importedBreadcrumbSeparatorfrom the package entry.ui/apps/console/src/__tests__/preview-samples-registry-resolvable.test.tsnamed theui/typographyprimitives as existing; it now says they are deleted..changeset/25921-components-zero-consumer-exports.md: patch level,!title, BREAKING paragraph that separates the deleted names from the off-entry ones, FROM/TO lines for every retired name, ADR-0087 markernot-required (runtime-export-retired …)naming all 63 operands.Why
Card #25921 narrows
ui/packagesbarrels to names someone imports. The checker export list after this PR is exactly the census list minus these 63 (471 to 408), nothing added.Tests
Census on
origin/mainab44ec9 with the method of batches 1 to 5: entry export names from the TypeScript checker (getExportsOfModuleonsrc/index.ts, 471); per namegit grep -l -w -Foutside the package, minus**/CHANGELOG.md,pnpm-lock.yamland.changeset/**(test files and prose count); the package*.md,docs/and*.json; keep rule 3; hotcrm6961ab1(0 hits for all 65; hotcrm does not import@object-ui/componentsat all, controlSelect8 files). Full per-name table with same-module controls: project fileissue-25921-seat6/census-b6.md.src/ui/(this batch)@object-ui/componentsThe other 82 zero-hit names (under
custom/,notifications/,hooks/,renderers/,lib/,dev/,share/, mostly Props types of kept components) are left for a later batch.Controls (outside hits, same module as the retired names):
Select458,Command215,Table180,AlertDialog58,Drawer51,Breadcrumb13,ContextMenu4,Carousel3;Form326 withFormField142.Readings at 7b1fe21 (branch head;
origin/mainhas since moved 8 commits, none touchingui/packages/components, and a re-grep of the 63 names on thatorigin/mainoutside the package still answers 0 files):Build, type-check, package tests
pnpm --filter '@object-ui/components...' build(the package and its dependency closure): VERDICT command-exit 0 underos-verify-lock; components rebuilt after the edit.pnpm --filter @object-ui/components type-check(tsc --noEmit && tsc -p tsconfig.test.json): exit 0.pnpm --filter @object-ui/components test: Test Files 477 passed, 1 skipped (478); Tests 4565 passed, 24 skipped (4589); VERDICT command-exit 0.Reverse check over every former entry name
A temporary probe under
ui/packages/plugin-view/srcimporting ALL 471 base entry names of@object-ui/components(asimport type),tsc --noEmit -pinui/packages/plugin-viewagainst the rebuiltdist/index.d.ts: exactly 63 errors in the probe (TS2305/TS2724), and the set of names they name is identical (diffempty) to the 63 retired names; the other 408 resolve. The run's 3 other errors are unbuilt sibling packages imported byObjectView.tsx(plugin-grid,plugin-form,permissions), outside the probe. Probe deleted;git statusclean.Gates
node scripts/pm/dispatch-gates.mjs --commands: 37 derived families, each run with its exit code captured before any pipe, all exit 0 on the final head. Two needed a second run:check-adr-0087-registration --base origin/mainwas red on the first commit (the grouped shadcn FROM line named no operand), fixed by the second commit and green on 7b1fe21 with all 63 operands verified;check:type-check-debtfirst answered PREREQUISITE NOT MET (exit 3, the closure build did not get the lock while dogfood held it) and was re-run under the lock: OK, 0 ledger entries re-measured, 0 raw tsc errors.dispatch-gates --ran: 37 derived, 37 run, 0 NOT-MEASURED (a derived zero: all 37 recorded an exit code, none 3).node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0, 0 anchored files in the change set.Dogfood (narrowing arm)
pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood testunderos-verify-lockon 7b1fe21: VERDICT command-exit 0; Test Files 421 passed, 3 skipped (424); Tests 3513 passed, 36 skipped (3549); no failures.No ablation: export lines, import paths and one deleted file nothing read.
Acceptance notes
Menubar,MenubarMenu,MenubarItem,NavigationMenuItem,InputOTPGroup,InputOTPSeparator,Carousel,CarouselItem(withCarouselApi),Pagination. Their outside hits are homonyms (same-named interfaces in@object-ui/types, schema-catalog titles, test prose about the schema renderers), none an import from this package. After this batch they cannot build their primitive from the entry alone. Left as is because the claim counts prose; the seat may rule them into a later batch.MenubarCheckboxItem) are off the entry but still in the file: deleting them would diverge the file from the registry copypnpm shadcn:updatere-fetches.Verification
Reviewer:
git grep -l -w -e TypographyH1 -e MenubarContent -e PaginationLink -- ':!ui/packages/components' ':!**/CHANGELOG.md'answers only this PR's changeset; the CIType Check UIlane compiles every@object-ui/*consumer against the narrowed entry.Generated by Claude Code